package com.gitee.shigen.api.feign.user;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.gitee.shigen.api.feign.user.vo.UserVO;
import com.gitee.shigen.common.msg.Result;

/**
 * @author shigenfu
 * @date 2023/5/5 2:31 下午
 */
@FeignClient(contextId = "shigen-sample", value = "shigen-sample")
public interface UserFeign {

    /**
     * 根据用户名获得用户信息
     *
     * @param username 用户名
     * @return 用户信息
     */
    @GetMapping(value = "user/getByName/{username}")
    Result<UserVO> getUserByUserName(@PathVariable("username") String username);
}
